﻿#-----------------------------------------------------------------------------
# 自动添加include目录
#-----------------------------------------------------------------------------
set(CMAKE_INCLUDE_CURRENT_DIR ON)

#-----------------------------------------------------------------------------
# 源码扫描
#-----------------------------------------------------------------------------
file(GLOB _headers "*.h")
file(GLOB _cpp "*.cpp")

#-----------------------------------------------------------------------------
# 添加动态库目标
#-----------------------------------------------------------------------------
add_library(Common
	${_headers}
	${_cpp}
)	

#-----------------------------------------------------------------------------
# 添加接口声明宏
#-----------------------------------------------------------------------------
target_compile_definitions(Common PRIVATE "COMMON_API")

list(APPEND _runtimes_libraries
	Qt5::Core
)

#-----------------------------------------------------------------------------
# 链接依赖库
#-----------------------------------------------------------------------------
target_link_libraries(Common PRIVATE
	${_runtimes_libraries}
)

#-----------------------------------------------------------------------------
# 添加依赖关系
#-----------------------------------------------------------------------------
set(FastCAE_Common_Runtimes_Libraries ${_runtimes_libraries} PARENT_SCOPE)